import Taro from "@tarojs/taro"

export function interceptor(chain) {
    const requestParams = chain.requestParams
    console.log("requestParams is --", requestParams)
    requestParams.url = `https://fenbide.hawnlink.cn${requestParams.url}`
    requestParams.header = {
        ...requestParams.header,
        openId: Taro.getStorageSync("openId")
    }

    return chain.proceed(requestParams)
        .then(res => {
            return res?.data
        })
}